package com.turing.post.cardmanagement.util;

import java.math.BigInteger;
import java.util.Date;
import java.util.List;

import javax.ejb.Local;
import javax.ejb.Remote;

import com.turing.post.util.PCPSApplicationException;
import com.turing.post.util.PCPSWebInput;

@Remote
@Local
public interface CardEventLogDao {
	/**
	 * 插入CardEventLog记录
	 * 
	 * @param CardEventLog
	 *            对象
	 * @throws PCPSApplicationException
	 */
	public void insert(CardEventLog cel) throws PCPSApplicationException;

	/**
	 * 更新CardEventLog记录
	 * 
	 * @param cel
	 * @throws PCPSApplicationException
	 */
	public void updateCardEventLog(CardEventLog cel)
			throws PCPSApplicationException;

	/**
	 * 获取机构日结数据
	 * 
	 * @param issueCompanyNo
	 *            发卡商号
	 * @param branchNo
	 *            机构号
	 * @param tranDate
	 *            帐务日期
	 * @return
	 */
	public List<Object[]> getBranchDaySettByBranchNoAndTranDate(
			String issueCompanyNo, String branchNo, Date tranDate);

	/**
	 * 卡事件日志查询列表
	 * 
	 * @param webInput
	 * @param startTranDate
	 * @param endTranDate
	 * @param cardNo
	 * @param cardClassicId
	 * @param page
	 * @return
	 */
	public List<CardEventLog> getCardEventLogList(PCPSWebInput webInput,
			String startTranDate, String endTranDate, String cardNo,
			BigInteger cardClassicId, String eventType, Integer page);

	/**
	 * 卡事件日志查询总数
	 * 
	 * @param webInput
	 * @param startTranDate
	 * @param endTranDate
	 * @param cardNo
	 * @param cardClassicId
	 * @return
	 */
	public BigInteger getCardEventLogCount(PCPSWebInput webInput,
			String startTranDate, String endTranDate, String cardNo,
			BigInteger cardClassicId, String eventType);

	/**
	 * 根据主键查询卡事件日志
	 * 
	 * @param cardEventId
	 * @return
	 */
	public CardEventLog getCardEventLog(BigInteger cardEventId);

	/**
	 * 卡-9： XXX功能操作明细报表
	 * 
	 * @param webInput
	 * @param startDate
	 * @param endDate
	 * @return
	 */
	public List<CardEventLogReport> getCardEventLogReportListByCondition(
			PCPSWebInput webInput, String branchNo, String startDate,
			String endDate);

	/**
	 * 卡-10： XXX功能操作明汇总表
	 * 
	 * @param webInput
	 * @param startDate
	 * @param endDate
	 * @return
	 */
	public List<Object[]> getCardEventLogReportCountByCondition(
			PCPSWebInput webInput, String branchNo, String startDate,
			String endDate);

	/**
	 * 获取某发卡机构下属销售机构某日特殊业务手续费总和
	 * 
	 * @param saleBrchNos
	 * @param startDate
	 * @param endDate
	 * @return
	 */
	public BigInteger getCardEventFactFeeBySaleBrchNos(String saleBrchNos,
			String startDate, String endDate);
}
